package org.firebug.spring.cloud.api.web.controller;

import org.firebug.spring.cloud.api.web.vo.UserVO;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/user")
public class UserController {
    @RequestMapping(value = "/save", method = RequestMethod.POST)
    public UserVO save(@RequestBody UserVO user) {
        return user;
    }

    @RequestMapping(value = "/modify", method = RequestMethod.PUT)
    public UserVO modify(@RequestBody UserVO user) {
        return user;
    }

    @RequestMapping(value = "/query/{id}", method = RequestMethod.GET)
    public UserVO query(@PathVariable long id) {
        return new UserVO(id, "felix");
    }
}
